feat(regex): preserve executable callback pseudo-block scope - #978
Merged
Conversation
Transfer callback local() frames to matcher ownership so committed paths keep their dynamic values while backtracking, failure, and exceptions unwind them. Treat callback implementation CVs as pseudo-blocks for caller, __SUB__, and escaping loop control, and keep named-unary scalar matches in scalar context. Update the Phase 36 plans with the 33/49 reg_eval_scope.t baseline and the remaining lexical pragma, recursive caller, and diagnostic work. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
local()frames to matcher ownership for forward continuation and backtracking unwindcaller,__SUB__, and escaping control flow on JVM and interpreter backendsscalarprecedence so a following match remains in scalar contextValidation
make— PASS (BUILD SUCCESSFUL in 3m 59s)make check-links— PASS (0 errors)re/rxcode.t— 42/42re/reg_eval_scope.t— 33/49 on JVM and interpreter (previously 22/49)The remaining 16
reg_eval_scope.tfailures are recorded in the plan: runtime/interpolated callback source and lexicalreflags, recursive callback caller/source lines, interpolatedqr//self identity, warning location, and the legacy escaped-callback diagnostic.